package com.itheima.controller;

import com.itheima.pojo.EmpGender;
import com.itheima.pojo.EmpjobData;
import com.itheima.pojo.Result;
import com.itheima.service.ReportService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Resource
    private ReportService reportService;

    @GetMapping("/empJobData")
    public Result empJobData(){
        EmpjobData data = reportService.empJobData();
        return Result.success(data);

    }
    @GetMapping("/empGenderData")
    public Result empGenderData(){
       List <EmpGender> list = reportService.empGenderData();
        return Result.success( list);
    }
}
